x86/mm: put HVM only code under CONFIG_HVM
authorWei Liu <wei.liu2@citrix.com>
Fri, 21 Sep 2018 15:54:51 +0000 (16:54 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 24 Sep 2018 16:47:27 +0000 (17:47 +0100)
commit026eac063bf756e9f5aa9afa1e4cb6b50dcf2a5b
tree2b793df4d7908698df0682c08c757648bb0c68fb
parent9629b62005fa88424a4f48102848c4524d0341e3
x86/mm: put HVM only code under CONFIG_HVM

Going through the code, HAP, EPT, PoD and ALTP2M depend on HVM code.
Put these components under CONFIG_HVM. This further requires putting
one of the vm event under CONFIG_HVM.

Altp2m requires a bit more attention because its code is embedded in
generic x86 p2m code.

Also make hap_enabled evaluate to false when !CONFIG_HVM. Make sure it
evaluate its parameter to avoid unused variable warnings in its users.

Also sort items in Makefile while at it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/Makefile
xen/arch/x86/mm/mem_access.c
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/altp2m.h
xen/include/asm-x86/domain.h
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/p2m.h